package com.demo.core.model;

import java.util.Date;

import com.demo.core.model.support.SimpleBaseModel;
import com.demo.security.access.model.SecurityUser;

/**
 * 用户模型
 * 用户基本信息
 * 用户登录验证信息
 * 实现安全用户接口{@link com.demo.security.access.model.SecurityUser}
 * @author ryuu.kk
 */
public class User extends SimpleBaseModel implements SecurityUser, java.io.Serializable {

	/**
	 * 版本序列化ID
	 */
	private static final long serialVersionUID = -9075202131559928578L;

	/**
	 * 机构外键ID
	 */
	private Long orgId;
	
	/**
	 * 用户名
	 */
	private String userName;
	
	/**
	 * 密码
	 */
	private String password;
	
	/**
	 * 盐值
	 */
	private String salt;
	
	/**
	 * 真实姓名
	 */
	private String realName;
	
	/**
	 * 用户邮件
	 */
	private String email;
	
	/**
	 * 性别
	 */
	private String gender;
	
	/**
	 * 生日
	 */
	private Date birthday;
	
	/**
	 * 来自（外键关联区域?）
	 */
	private String comeFrom;
	
	/**
	 * 地址
	 */
	private String address;
	
	/**
	 * 电话
	 */
	private String mobile;
	
	/**
	 * 固话
	 */
	private String tel;
	
	/**
	 * 传真
	 */
	private String fax;
	
	/**
	 * 注册时间
	 */
	private Date registerTime;
	
	/**
	 * 密码到期日
	 */
	private Date expireDay;
	
	/**
	 * 账号是否可用
	 */
	private Boolean enabled;
	
	/**
	 * 账号是否锁定
	 */
	private Boolean locked;
	
	/**
	 * 账号是否有效
	 */
	private Boolean isValid;
	
	/**
	 * 用户所在机构
	 */
	private Org org;
	
	public Long getOrgId() {
		return orgId;
	}
	public void setOrgId(Long orgId) {
		this.orgId = orgId;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getSalt() {
		return salt;
	}
	public void setSalt(String salt) {
		this.salt = salt;
	}
	public String getRealName() {
		return realName;
	}
	public void setRealName(String realName) {
		this.realName = realName;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public String getComeFrom() {
		return comeFrom;
	}
	public void setComeFrom(String comeFrom) {
		this.comeFrom = comeFrom;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	public String getFax() {
		return fax;
	}
	public void setFax(String fax) {
		this.fax = fax;
	}
	public Date getRegisterTime() {
		return registerTime;
	}
	public void setRegisterTime(Date registerTime) {
		this.registerTime = registerTime;
	}
	public Date getExpireDay() {
		return expireDay;
	}
	public void setExpireDay(Date expireDay) {
		this.expireDay = expireDay;
	}
	public Boolean getEnabled() {
		return enabled;
	}
	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}
	public Boolean getLocked() {
		return locked;
	}
	public void setLocked(Boolean locked) {
		this.locked = locked;
	}
	public Boolean getIsValid() {
		return isValid;
	}
	public void setIsValid(Boolean isValid) {
		this.isValid = isValid;
	}
	public Org getOrg() {
		return org;
	}
	public void setOrg(Org org) {
		this.org = org;
	}
}
